﻿@{
    ViewBag.Title = "撰写新文章";
    Layout = "_adminLayout.cshtml";
}
<div id="subNav" title="posts">
</div>
<div class="container posts-body">
    <h2>撰写新文章</h2>
    <form method="post" action="/sean/posts/edit">
        <div class="line">
            <div class="xb9 padding-right">
                <div class="form-group">
                    <div class="field">
                        <input type="text" class="input" id="Title" name="Title" value="" size="30" data-validate="required:必填" placeholder="在此输入标题" />
                    </div>
                </div>
                <div class="form-group">
                    <div class="field">
                        <textarea id="editor" name="Content" placeholder="这里输入内容" autofocus></textarea>
                    </div>
                </div>
            </div>
            <div class="xb3">
                <div class="panel posts-box">
                    <div class="panel-head">分类目录</div>
                    <div class="panel-body">
                        <div class="form-group">
                            <div class="field label label-block">
                                @foreach (var item in ViewBag.Categorys)
                                {
                                    <label><input value="@item.Id" data-validate="radio:请选择分类目录" type="radio" name="CategoryId"> @item.CategoryName</label>
                                }
                            </div>
                        </div>
                    </div>
                </div>
                <div class="panel posts-box">
                    <div class="panel-head">发布</div>
                    <div class="panel-body">
                        <ul class="list-unstyle height">
                            <li class="padding-bottom">
                                <i class="icon-filter text-gray"></i>状态：<label><input type="radio" name="status" checked="checked">已发布</label>
                                <label><input type="radio" name="status">草稿</label>
                            </li>
                            <li><i class="icon-calendar text-gray"></i>发布于：未发布</li>
                        </ul>
                    </div>
                    <div class="panel-foot text-right">
                        <button class="button bg-dot" type="submit">发布</button>
                    </div>
                </div>
            </div>
        </div>
    </form>
</div>
@section scripts{
    <script>
        Do.ready('base', 'editor', function () {
            var editor = new Simditor({
                textarea: $('#editor')
            });
        });
    </script>
}